package com.cac.demo.util.adapter;

/**
 * @className: PageParameter
 * @description: （描述这个类的作用）
 * @author:
 * @date: 2024/6/22 11:03:03 周六
 * @version: 1.0
 */
public class PageParameter {
    public static final int DEFAULT_PAGE_SIZE = 20;
    private int pageSize;
    private int pageNum;
    private long totalPage;
    private long totalCount;
    private String order;
    private String sort;

    public PageParameter() {
        this.pageNum = 1;
        this.pageSize = 20;
    }

    public PageParameter(int currentPage, int pageSize) {
        this.pageNum = currentPage;
        this.pageSize = pageSize;
    }

    public int getPage() {
        return this.pageNum;
    }

    public void setPage(int currentPage) {
        this.pageNum = currentPage;
    }

    public int getRows() {
        return this.pageSize;
    }

    public void setRows(int pageSize) {
        this.pageSize = pageSize;
    }

    public long getTotalPage() {
        return this.totalPage;
    }

    public void setTotalPage(long totalPage) {
        this.totalPage = totalPage;
    }

    public long getTotalCount() {
        return this.totalCount;
    }

    public void setTotalCount(long totalCount) {
        this.totalCount = totalCount;
    }

    public String getOrder() {
        return this.order;
    }

    public void setOrder(String order) {
        this.order = order;
    }

    public String getSort() {
        return this.sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public String toString() {
        return "PageParameter{rows=" + this.pageSize + ", page=" + this.pageNum + ", totalPage=" + this.totalPage + ", totalCount=" + this.totalCount + ", order='" + this.order + '\'' + ", sort='" + this.sort + '\'' + '}';
    }
}
